Replication Archive for: Coppock, Alexander and Donald P. Green. 2020. "Do Belief Systems Exhibit Dynamic Constraint?" The Journal of Politics, Forthcoming.

This replication archive contains the data and analysis scripts necessary to reproduce all the analyses in the paper and in the appendix. 



Files included:


# Helper files

We recommend opening this file and working within this R project, as all the file paths will (probably!) be correct
dc_replication_archive.Rproj 

helper_functions.R


Raw Data Files:

dv_df.rds
factor_analysis_models.rdata
studies_1_2_lucid_raw.csv
study_1_elite_wave_1_raw.csv
study_1_elite_wave_2_raw.csv
study_1_mturk_wave_1_raw.csv
study_1_mturk_wave_2_raw.csv
study_1_mturk_wave_3_raw.csv
study_2_lucid_covariates.xlsx
study_2_lucid_raw.csv
study_3_lucid_raw.csv
Trump605 (This folder of data was produced by others and directly obtained from the TESS website)

# Cleaning Scripts

studies_1_2_replications_lucid_cleaning.R
study_1_elite_cleaning.R
study_1_mturk_cleaning.R
study_2_lucid_cleaning.R
study_3_lucid_cleaning.R
study_3_original_cleaning.R

# Clean data files 

These files are in .rds format so that the variables work as intended when loaded in to R.

dc_replication_cleaned.rds
elite_opeds_cleaned.rds
lucid_cleaned.rds
mturk_opeds_cleaned.rds
original_trump_white_clean.rds
replication_trump_white_clean.rds
studies_1_2_replications_lucid_cleaned.rds
study_1_elite_cleaned.rds
study_1_mturk_cleaned.rds
study_2_lucid_clean.rds

# Analysis programs

in_text_numbers.R
study_1_figure_4.R
study_1_table_1.R
study_2_table_2.R
study_3_table_3.R
study_4_table_4.R

appendix_figure_B2.R
appendix_figure_B3.R
appendix_table_C3.R
appendix_table_C4.R
appendix_table_D2.R
appendix_table_D5.R



# Software versions

This replication archive is written in R and makes use of various packages, which you can install with: 

install.packages(c("tidyverse", "estimatr", "coefplot", "xtable", "janitor", "rsample", "rmeta", "psych", "car", "readxl", "lubridate", "haven"))


I confirmed that all scripts ran using the following software versions:

> sessionInfo()
R version 4.0.2 (2020-06-22)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Catalina 10.15.7

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] haven_2.3.1     lubridate_1.7.9 readxl_1.3.1    car_3.0-10      carData_3.0-4   psych_2.0.9     rmeta_3.0       rsample_0.0.8  
 [9] janitor_2.0.1   xtable_1.8-4    coefplot_1.2.6  estimatr_0.26.0 forcats_0.5.0   stringr_1.4.0   dplyr_1.0.2     purrr_0.3.4    
[17] readr_1.3.1     tidyr_1.1.1     tibble_3.0.3    ggplot2_3.3.2   tidyverse_1.3.0

loaded via a namespace (and not attached):
 [1] nlme_3.1-149      fs_1.5.0          httr_1.4.2        useful_1.2.6      tools_4.0.2       backports_1.1.10  R6_2.4.1         
 [8] DBI_1.1.0         colorspace_1.4-1  withr_2.2.0       tidyselect_1.1.0  mnormt_2.0.1      emmeans_1.5.0     curl_4.3         
[15] compiler_4.0.2    cli_2.0.2         rvest_0.3.6       xml2_1.3.2        sandwich_2.5-1    scales_1.1.1      mvtnorm_1.1-1    
[22] digest_0.6.25     foreign_0.8-80    rio_0.5.16        pkgconfig_2.0.3   dbplyr_1.4.4      rlang_0.4.7       rstudioapi_0.11  
[29] generics_0.0.2    zoo_1.8-8         jsonlite_1.7.1    zip_2.1.0         magrittr_1.5      Formula_1.2-3     texreg_1.37.5    
[36] Matrix_1.2-18     Rcpp_1.0.5        munsell_0.5.0     fansi_0.4.1       abind_1.4-5       lifecycle_0.2.0   furrr_0.1.0      
[43] stringi_1.4.6     multcomp_1.4-13   snakecase_0.11.0  MASS_7.3-52       plyr_1.8.6        grid_4.0.2        blob_1.2.1       
[50] parallel_4.0.2    listenv_0.8.0     crayon_1.3.4      lattice_0.20-41   splines_4.0.2     hms_0.5.3         tmvnsim_1.0-2    
[57] pillar_1.4.6      estimability_1.3  reshape2_1.4.4    codetools_0.2-16  reprex_0.3.0      glue_1.4.2        packrat_0.5.0    
[64] data.table_1.13.0 modelr_0.1.8      vctrs_0.3.4       cellranger_1.1.0  gtable_0.3.0      future_1.18.0     assertthat_0.2.1 
[71] openxlsx_4.1.5    broom_0.7.0       coda_0.19-3       survival_3.2-3    globals_0.12.5    TH.data_1.0-10    ellipsis_0.3.1 
